import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

var state = {
  city: localStorage.getItem('city') ? localStorage.getItem('city') : '西安'
}

var mutations = {
  changeCity (state, city) {
    // console.log(city)
    this.state.city = city
    localStorage.setItem('city', city)
  }
}
export default new Vuex.Store({
  state,
  mutations
})
